package com.example.testapp.activity.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 线程池管理工具类
 * Created by l on 2016/8/23.
 */
public class ThreadPoolManager {

    private ExecutorService service;
    public static final ThreadPoolManager manager = new ThreadPoolManager();

    private ThreadPoolManager(){
        int num = Runtime.getRuntime().availableProcessors();
        service = Executors.newCachedThreadPool();
    }

    public static ThreadPoolManager getInstance() {
        return manager;
    }
}
